<template>
    <div class="content">
      <div class="containt-box">
        <div class="success_step">
          <p class="step">
            <span>付款成功（投标中）</span>
          </p>
          <p class="time">{{buy_list.dealTime}}</p>
        </div>
        <div class="success_step">
          <p class="step">投标成功</p>
          <p class="time">预计1个工作日内</p>
        </div>
      </div>
     <div v-if="adlist.length!==0">
       <a href="javascript:void(0)" class="success_banner" v-bind:key="item.url"  v-for="item in adlist" @click="jump(item.link)">
         <img v-lazy="item.url" />
       </a>
     </div>
    </div>
</template>

<script>
export default {
  props: [],
  data() {
    return {
      money: "",
      starttime: "",
      endtime: "",
      adlist: [],
      buy_list: {}
    };
  },
  methods: {
    jump(url) {
      var typeStyle = "jumpToEvents";
      var data = {
        result: 0,
        type: typeStyle,
        urlEvents: url,
        share: {}
      };
      if (
        this.Uitis.ua.indexOf("mzapp") !== -1 &&
        (this.Uitis.ua.indexOf("iphone") !== -1 ||
          this.Uitis.ua.indexOf("ipad") !== -1)
      ) {
        this.Uitis.setupWebViewJavascriptBridge(function(bridge) {
          bridge.callHandler("ObjcCallBackJs", JSON.stringify(data), function(
            response
          ) {});
        });
      } else if (
        this.Uitis.ua.indexOf("mzapp") !== -1 &&
        this.Uitis.ua.indexOf("android") !== -1
      ) {
        window.demo.jumpToEvents(JSON.stringify(data));
      }
    }
  },
  created() {
    //我的投资详情
    this.Uitis.getInfo().then(data => {
      this.$http
        .get(this.Interface.getMyinvestDetail, {
          params: {
            partId: this.$route.query.partId,
            sessionid: data.sessionid
          }
        })
        .then(res => {
          if (res.data.success == true) {
            this.buy_list = res.data.data;
          }
        });
    });
    //广告列表
    this.$http
      .get(this.Interface.getAdList, { params: { adspaceId: 20 } })
      .then(res => {
        if (res.data.success == true) {
          this.adlist = res.data.data.list;
        }
      });
  }
};
</script>


<style lang="less">
.content{
  height: 100%;
  background: #f3f3f3
}
.containt-box {
  padding: 50px 0 50px 50px;
  margin-bottom: 34px;
  background-color: #fff;
}

.containt-box .success_step {
  padding-left: 60px;
  background: url("../public/imgs/busuccess_one.png") left top no-repeat;
  background-size: 38px 88px;
  height: 88px;
}

.containt-box .success_step .step {
  font-size: 32px;
  color: #5261f7 !important;
  text-align: left;
  line-height: 32px;
}

.containt-box .success_step .time {
  padding-top: 20px;
  font-size: 20px;
  color: #999;
  text-align: left;
}

.containt-box .success_step:nth-child(2) {
  background: url("../public/imgs/busuccess_two.png") left top no-repeat;
  background-size: 38px 88px;
  height: auto;
}

.containt-box .success_step:nth-child(2) .step {
  padding-top: 46px;
  color: #999999;
}

.success_banner {
  display: block;
  width: 100%;
}

.success_banner img {
  width: 100%;
}


</style>
